using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerWallJumpState : PlayerAbilityState
{
    public PlayerWallJumpState(Player player, PlayerMoveData playerData, StateMachine stateMachine, string animBoolName) : base(player, playerData, stateMachine, animBoolName)
    {
    }

    public override void Enter()
    {
        base.Enter();

        player.SetVelocityX(playerData.wallJumpVelocity.x * -player.FacingDirection);
        player.SetVelocityY(playerData.wallJumpVelocity.y);
    }

    public override void LogicUpdate()
    {
        base.LogicUpdate();

        if (!isAbilityDone && Time.time - stateEnterTime >= playerData.wallJumpTime) 
        {
            isAbilityDone = true;
        }
    }
}
